<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui">
<f:view locale="es_UY">
	<ui:composition template="layout/layout.xhtml">
		<ui:define name="body">
			<h:form id="formArea" rendered="#{loginBean.usuarioLogueado}">
				<p:dataGrid var="area" value="#{lstAreaBean.areas}" columns="3" rows="12" paginator="true" paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="9,12,15">
					<p:panel header="#{area.nombre}" style="text-align:center">
						<h:panelGrid columns="1" style="width:100%">
							<h:outputText value="#{area.descripcion}" />
							<p:graphicImage value="#{area.imagen}" style="width: 20%" />
							<p:commandButton value="Seleccionar" icon="ui-icon-extlink" action="#{areaBean.cargarListadoTareasDeArea}">
								<f:setPropertyActionListener value="#{area}" target="#{areaBean.selectedArea}" />
							</p:commandButton>
						</h:panelGrid>
					</p:panel>
				</p:dataGrid>
			</h:form>			
		</ui:define>
	</ui:composition>
</f:view>

</html>